home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************************/
- /* */
- /* ARTask.h - Serial NB task definitions. */
- /* */
- /* Richard W. Mincher. February 20, 1990. */
- /* */
- /* Copyright © 1990, Apple Computer, Inc. All rights reserved. */
- /* */
- /********************************************************************************/
-
- #define SNBCLOCK 7372800 /* Serial NB Clock Freq (Hz) */
-
- #define SCC_C1A (unsigned char *)0x500005 /* SCC #1 Channel A Control */
- #define SCC_D1A (unsigned char *)0x500007 /* SCC #1 Channel A Data */
-
- #define SCC_C1B (unsigned char *)0x500001 /* SCC #1 Channel B Control */
- #define SCC_D1B (unsigned char *)0x500003 /* SCC #1 Channel B Data */
-
- #define SCC_C2A (unsigned char *)0x400005 /* SCC #2 Channel A Control */
- #define SCC_D2A (unsigned char *)0x400007 /* SCC #2 Channel A Data */
-
- #define SCC_C2B (unsigned char *)0x400001 /* SCC #2 Channel B Control */
- #define SCC_D2B (unsigned char *)0x400003 /* SCC #2 Channel B Data */
-
- #define VS_1A_TBE (unsigned long *)0x120 /* Vector SCC #1 Channel A TBE */
- #define VS_1A_ESC (unsigned long *)0x128 /* Vector SCC #1 Channel A ESC */
- #define VS_1A_RCA (unsigned long *)0x130 /* Vector SCC #1 Channel A RCA */
- #define VS_1A_SRC (unsigned long *)0x138 /* Vector SCC #1 Channel A SRC */
-
- #define VS_1B_TBE (unsigned long *)0x100 /* Vector SCC #1 Channel A TBE */
- #define VS_1B_ESC (unsigned long *)0x108 /* Vector SCC #1 Channel A ESC */
- #define VS_1B_RCA (unsigned long *)0x110 /* Vector SCC #1 Channel A RCA */
- #define VS_1B_SRC (unsigned long *)0x118 /* Vector SCC #1 Channel A SRC */
-
- #define VS_2A_TBE (unsigned long *)0x160 /* Vector SCC #1 Channel A TBE */
- #define VS_2A_ESC (unsigned long *)0x168 /* Vector SCC #1 Channel A ESC */
- #define VS_2A_RCA (unsigned long *)0x170 /* Vector SCC #1 Channel A RCA */
- #define VS_2A_SRC (unsigned long *)0x178 /* Vector SCC #1 Channel A SRC */
-
- #define VS_2B_TBE (unsigned long *)0x140 /* Vector SCC #1 Channel A TBE */
- #define VS_2B_ESC (unsigned long *)0x148 /* Vector SCC #1 Channel A ESC */
- #define VS_2B_RCA (unsigned long *)0x150 /* Vector SCC #1 Channel A RCA */
- #define VS_2B_SRC (unsigned long *)0x158 /* Vector SCC #1 Channel A SRC */
-
- #define SIZETX 2000 /* Size of transmit buffer */
-
- #define SIZERX 2000 /* Size of receive buffer */
- #define RXSTOP 200 /* When to turn on flow ctl. */
- #define RXSTART 250 /* When to turn on flow ctl. */
-
- #define TICKLESIZE 100 /* Tx/Rx Tickle size */
-
-
- struct globals
- {
- tid_type myTid;
- tid_type hisTid;
- unsigned short sRxCount;
- unsigned short sTxCount;
-
- unsigned char *txFirst;
- unsigned char *txOut;
- unsigned char *txIn;
- unsigned char *txLast;
- AROSEmessage *txQHead;
- AROSEmessage *txQTail;
- AROSEmessage *txSignal;
- short txCount;
- short txTickle;
- short txMax;
-
- unsigned char *rxFirst;
- unsigned char *rxOut;
- unsigned char *rxIn;
- unsigned char *rxLast;
- AROSEmessage *rxQHead;
- AROSEmessage *rxQTail;
- AROSEmessage *rxSignal;
- short rxCount;
- short rxTickle;
- short rxMax;
-
- long tbeCount;
- long escCount;
- long rcaCount;
- long srcCount;
-
- unsigned char peChar;
- unsigned char altChar;
- unsigned char asyncErr;
- unsigned char flowOff;
- unsigned char readCmd;
- unsigned char writeCmd;
- unsigned char CTSFlag;
- unsigned char xOffFlag;
- unsigned char ctlOptions;
- unsigned char swhs;
- unsigned char hwhs;
- unsigned char sendXOnff;
- unsigned char charMask;
- unsigned char xOnChar;
- unsigned char xOffChar;
- unsigned char options;
- unsigned char postOptions;
- unsigned char inSwHs;
- unsigned char inHwHs;
- unsigned char prevStat;
- unsigned char moreTx;
-
- unsigned char lastWR3;
- unsigned char lastWR4;
- unsigned char lastWR5;
- unsigned char baudHigh;
- unsigned char baudLow;
- };
-
- #ifdef MAIN && MCP
- #define extern
- #endif MAIN & MCP
-
- #ifdef MCP
- extern message *msg;
- extern short open;
- extern short reply;
- #endif
-
- #ifdef MAIN && MCP
- #undef extern
- #endif
-